#ifndef GST_GridFileWrappingGeometry_h__
#define GST_GridFileWrappingGeometry_h__

#include "buildspec.h"
#include "Geometry/ClientGeometry.h"

#include "Parsers/GocadVoxetParser.hpp"

#include <string>
#include <vector>

namespace GST
{
namespace Geometry
{

class GST_API_EXPORT GridParsedGeometry
		: public ClientGeometry
{
	friend class TextFileReader;

public:
	GridParsedGeometry(Parsers::GocadParser::VoxetMetaData voxetMetaData);

	virtual unsigned int addSimplexProperty(
			const std::string &name,
			const ClientSimplexProperty::PropertyType &PropertyType,
			const unsigned int &dims);
	virtual unsigned int addSimplexProperty(const ClientSimplexProperty &p);
	virtual SmplxPropertyListPtr getProperties() const;
	virtual void setProperties(const SmplxPropertyListPtr &newlist);

	virtual void SaveGeometry(const std::string &filename,
							  const FileType &filetype);
	virtual void SaveProperty(const std::string &filename,
							  const FileType &filetype);
	virtual void saveToFile(const std::string &filename,
							const FileType &filetype);
	virtual void loadFromFile(const std::string &, const FileType &);

	virtual bool serializeSimplexPropertyDescription(std::ostream &os) const;
	virtual bool serializeSimplexPropertyValues(std::ostream &os) const;
	virtual bool serializeGeometry(std::ostream &os) const;

	// overrides
	virtual void setName(const std::string & name);

	Parsers::GocadParser::VoxetMetaData voxetMetaData;
	SmplxPropertyListPtr simplexProperties;
};

} // namespace Geometry
} // namespace GST

#endif // GST_GridFileWrappingGeometry_h__